<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>

  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <title>Chapter 3 Risk Parity Portfolios | The Open Quant Live Book</title>
  <meta name="description" content="Chapter 3 Risk Parity Portfolios | The Open Quant Live Book" />
  <meta name="generator" content="bookdown 0.13 and GitBook 2.6.7" />

  <meta property="og:title" content="Chapter 3 Risk Parity Portfolios | The Open Quant Live Book" />
  <meta property="og:type" content="book" />
  
  <meta property="og:image" content="./fig/cover.jpg" />
  <meta property="og:description" content="Chapter 3 Risk Parity Portfolios | The Open Quant Live Book" />
  <meta name="github-repo" content="souzatharsis/open-quant-live-book" />

  <meta name="twitter:card" content="summary" />
  <meta name="twitter:title" content="Chapter 3 Risk Parity Portfolios | The Open Quant Live Book" />
  
  <meta name="twitter:description" content="Chapter 3 Risk Parity Portfolios | The Open Quant Live Book" />
  <meta name="twitter:image" content="./fig/cover.jpg" />

<meta name="author" content="OpenQuants.com" />


<meta name="date" content="2019-12-16" />

  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  
  
<link rel="prev" href="stylized-facts.html"/>
<link rel="next" href="entropy.html"/>
<script src="libs/jquery-2.2.3/jquery.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />







<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-75703863-2"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-75703863-2');
</script>


<!-- Hypotheses -->
<!-- <script src="https://hypothes.is/embed.js" async></script> -->


<style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
  margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; line-height: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
code > span.dt { color: #902000; } /* DataType */
code > span.dv { color: #40a070; } /* DecVal */
code > span.bn { color: #40a070; } /* BaseN */
code > span.fl { color: #40a070; } /* Float */
code > span.ch { color: #4070a0; } /* Char */
code > span.st { color: #4070a0; } /* String */
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
code > span.ot { color: #007020; } /* Other */
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
code > span.fu { color: #06287e; } /* Function */
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
code > span.cn { color: #880000; } /* Constant */
code > span.sc { color: #4070a0; } /* SpecialChar */
code > span.vs { color: #4070a0; } /* VerbatimString */
code > span.ss { color: #bb6688; } /* SpecialString */
code > span.im { } /* Import */
code > span.va { color: #19177c; } /* Variable */
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code > span.op { color: #666666; } /* Operator */
code > span.bu { } /* BuiltIn */
code > span.ex { } /* Extension */
code > span.pp { color: #bc7a00; } /* Preprocessor */
code > span.at { color: #7d9029; } /* Attribute */
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
</style>

<link rel="stylesheet" href="custom_style.css" type="text/css" />
</head>

<body>



  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">

    <div class="book-summary">
      <nav role="navigation">

<ul class="summary">
<li><a href="./">The Open Quant Live Book</a></li>

<li class="divider"></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i>Preface</a><ul>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html#description"><i class="fa fa-check"></i>Description</a></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html#contribute"><i class="fa fa-check"></i>Contribute</a></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html#working-contents"><i class="fa fa-check"></i>Working Contents</a></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html#books-information"><i class="fa fa-check"></i>Book’s information</a></li>
</ul></li>
<li class="part"><span><b>I The Basics</b></span></li>
<li class="chapter" data-level="1" data-path="io.html"><a href="io.html"><i class="fa fa-check"></i><b>1</b> I/O</a><ul>
<li class="chapter" data-level="1.1" data-path="io.html"><a href="io.html#importing-data"><i class="fa fa-check"></i><b>1.1</b> Importing Data</a><ul>
<li class="chapter" data-level="1.1.1" data-path="io.html"><a href="io.html#text-files"><i class="fa fa-check"></i><b>1.1.1</b> Text Files</a></li>
<li class="chapter" data-level="1.1.2" data-path="io.html"><a href="io.html#excel-files"><i class="fa fa-check"></i><b>1.1.2</b> Excel Files</a></li>
<li class="chapter" data-level="1.1.3" data-path="io.html"><a href="io.html#json-files"><i class="fa fa-check"></i><b>1.1.3</b> JSON Files</a></li>
<li class="chapter" data-level="1.1.4" data-path="io.html"><a href="io.html#large-files"><i class="fa fa-check"></i><b>1.1.4</b> Large Files</a></li>
</ul></li>
<li class="chapter" data-level="1.2" data-path="io.html"><a href="io.html#data-sources"><i class="fa fa-check"></i><b>1.2</b> Data Sources</a><ul>
<li class="chapter" data-level="1.2.1" data-path="io.html"><a href="io.html#alpha-vantage"><i class="fa fa-check"></i><b>1.2.1</b> Alpha Vantage</a></li>
<li class="chapter" data-level="1.2.2" data-path="io.html"><a href="io.html#iex"><i class="fa fa-check"></i><b>1.2.2</b> IEX</a></li>
<li class="chapter" data-level="1.2.3" data-path="io.html"><a href="io.html#quandl"><i class="fa fa-check"></i><b>1.2.3</b> Quandl</a></li>
<li class="chapter" data-level="1.2.4" data-path="io.html"><a href="io.html#sec"><i class="fa fa-check"></i><b>1.2.4</b> SEC</a></li>
</ul></li>
<li class="chapter" data-level="1.3" data-path="io.html"><a href="io.html#conclusion"><i class="fa fa-check"></i><b>1.3</b> Conclusion</a><ul>
<li class="chapter" data-level="1.3.1" data-path="io.html"><a href="io.html#further-reading"><i class="fa fa-check"></i><b>1.3.1</b> Further Reading</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="2" data-path="stylized-facts.html"><a href="stylized-facts.html"><i class="fa fa-check"></i><b>2</b> Stylized Facts</a><ul>
<li class="chapter" data-level="2.1" data-path="stylized-facts.html"><a href="stylized-facts.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
<li class="chapter" data-level="2.2" data-path="stylized-facts.html"><a href="stylized-facts.html#distribution-of-returns"><i class="fa fa-check"></i><b>2.2</b> Distribution of Returns</a><ul>
<li class="chapter" data-level="2.2.1" data-path="stylized-facts.html"><a href="stylized-facts.html#fat-tails"><i class="fa fa-check"></i><b>2.2.1</b> Fat Tails</a></li>
<li class="chapter" data-level="2.2.2" data-path="stylized-facts.html"><a href="stylized-facts.html#skewness"><i class="fa fa-check"></i><b>2.2.2</b> Skewness</a></li>
</ul></li>
<li class="chapter" data-level="2.3" data-path="stylized-facts.html"><a href="stylized-facts.html#volatility"><i class="fa fa-check"></i><b>2.3</b> Volatility</a><ul>
<li class="chapter" data-level="2.3.1" data-path="stylized-facts.html"><a href="stylized-facts.html#time-invariance"><i class="fa fa-check"></i><b>2.3.1</b> Time-invariance</a></li>
<li class="chapter" data-level="2.3.2" data-path="stylized-facts.html"><a href="stylized-facts.html#volatility-clustering"><i class="fa fa-check"></i><b>2.3.2</b> Volatility Clustering</a></li>
<li class="chapter" data-level="2.3.3" data-path="stylized-facts.html"><a href="stylized-facts.html#correlation-with-trading-volume"><i class="fa fa-check"></i><b>2.3.3</b> Correlation with Trading Volume</a></li>
</ul></li>
<li class="chapter" data-level="2.4" data-path="stylized-facts.html"><a href="stylized-facts.html#correlation"><i class="fa fa-check"></i><b>2.4</b> Correlation</a><ul>
<li class="chapter" data-level="2.4.1" data-path="stylized-facts.html"><a href="stylized-facts.html#time-invariance-1"><i class="fa fa-check"></i><b>2.4.1</b> Time-invariance</a></li>
<li class="chapter" data-level="2.4.2" data-path="stylized-facts.html"><a href="stylized-facts.html#auto-correlation"><i class="fa fa-check"></i><b>2.4.2</b> Auto-correlation</a></li>
</ul></li>
</ul></li>
<li class="part"><span><b>II Algo Trading</b></span></li>
<li class="part"><span><b>III Portfolio Optimization</b></span></li>
<li class="chapter" data-level="3" data-path="risk-parity-portfolios.html"><a href="risk-parity-portfolios.html"><i class="fa fa-check"></i><b>3</b> Risk Parity Portfolios</a><ul>
<li class="chapter" data-level="3.1" data-path="risk-parity-portfolios.html"><a href="risk-parity-portfolios.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
<li class="chapter" data-level="3.2" data-path="risk-parity-portfolios.html"><a href="risk-parity-portfolios.html#risk-parity-portfolio"><i class="fa fa-check"></i><b>3.2</b> Risk Parity Portfolio</a></li>
<li class="chapter" data-level="3.3" data-path="risk-parity-portfolios.html"><a href="risk-parity-portfolios.html#tangency-portfolio"><i class="fa fa-check"></i><b>3.3</b> Tangency Portfolio</a></li>
<li class="chapter" data-level="3.4" data-path="risk-parity-portfolios.html"><a href="risk-parity-portfolios.html#optimizing-faang-ray-dalio-versus-markowitz"><i class="fa fa-check"></i><b>3.4</b> Optimizing FAANG: Ray Dalio versus Markowitz</a><ul>
<li class="chapter" data-level="3.4.1" data-path="risk-parity-portfolios.html"><a href="risk-parity-portfolios.html#single-portfolio"><i class="fa fa-check"></i><b>3.4.1</b> Single Portfolio</a></li>
<li class="chapter" data-level="3.4.2" data-path="risk-parity-portfolios.html"><a href="risk-parity-portfolios.html#the-ray-dalio-faang-index"><i class="fa fa-check"></i><b>3.4.2</b> The Ray Dalio FAANG Index</a></li>
</ul></li>
<li class="chapter" data-level="3.5" data-path="risk-parity-portfolios.html"><a href="risk-parity-portfolios.html#discussion-and-conclusion"><i class="fa fa-check"></i><b>3.5</b> Discussion and Conclusion</a></li>
</ul></li>
<li class="part"><span><b>IV Machine Learning</b></span></li>
<li class="part"><span><b>V Econophysics</b></span></li>
<li class="chapter" data-level="4" data-path="entropy.html"><a href="entropy.html"><i class="fa fa-check"></i><b>4</b> Entropy</a><ul>
<li class="chapter" data-level="4.1" data-path="entropy.html"><a href="entropy.html#introduction-2"><i class="fa fa-check"></i><b>4.1</b> Introduction</a></li>
<li class="chapter" data-level="4.2" data-path="entropy.html"><a href="entropy.html#nonlinear-coupling"><i class="fa fa-check"></i><b>4.2</b> Nonlinear Coupling</a><ul>
<li class="chapter" data-level="4.2.1" data-path="entropy.html"><a href="entropy.html#simulated-systems"><i class="fa fa-check"></i><b>4.2.1</b> Simulated Systems</a></li>
<li class="chapter" data-level="4.2.2" data-path="entropy.html"><a href="entropy.html#equity-commodities-relationship"><i class="fa fa-check"></i><b>4.2.2</b> Equity-Commodities Relationship</a></li>
</ul></li>
<li class="chapter" data-level="4.3" data-path="entropy.html"><a href="entropy.html#efficiency-and-bubbles-a-case-study-in-the-crypto-and-equity-markets"><i class="fa fa-check"></i><b>4.3</b> Efficiency and Bubbles: A Case Study in the Crypto and Equity Markets</a></li>
</ul></li>
<li class="chapter" data-level="5" data-path="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html"><a href="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html"><i class="fa fa-check"></i><b>5</b> How to Measure Statistical Causality: A Transfer Entropy Approach with Financial Applications</a><ul>
<li class="chapter" data-level="5.1" data-path="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html"><a href="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html#LinearG"><i class="fa fa-check"></i><b>5.1</b> A First Definition of Causality</a></li>
<li class="chapter" data-level="5.2" data-path="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html"><a href="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html#a-probabilistic-based-definition"><i class="fa fa-check"></i><b>5.2</b> A Probabilistic-Based Definition</a></li>
<li class="chapter" data-level="5.3" data-path="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html"><a href="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html#nonlinearG"><i class="fa fa-check"></i><b>5.3</b> Transfer Entropy and Statistical Causality</a></li>
<li class="chapter" data-level="5.4" data-path="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html"><a href="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html#net-information-flow"><i class="fa fa-check"></i><b>5.4</b> Net Information Flow</a></li>
<li class="chapter" data-level="5.5" data-path="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html"><a href="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html#the-link-between-granger-causality-and-transfer-entropy"><i class="fa fa-check"></i><b>5.5</b> The Link Between Granger-causality and Transfer Entropy</a></li>
<li class="chapter" data-level="5.6" data-path="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html"><a href="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html#information-flow-on-simulated-systems"><i class="fa fa-check"></i><b>5.6</b> Information Flow on Simulated Systems</a></li>
<li class="chapter" data-level="5.7" data-path="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html"><a href="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html#information-flow-among-international-stock-market-indices"><i class="fa fa-check"></i><b>5.7</b> Information Flow among International Stock Market Indices</a></li>
<li class="chapter" data-level="5.8" data-path="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html"><a href="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html#other-applications"><i class="fa fa-check"></i><b>5.8</b> Other Applications</a><ul>
<li class="chapter" data-level="5.8.1" data-path="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html"><a href="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html#quantifying-information-flow-between-social-media-and-the-stock-market"><i class="fa fa-check"></i><b>5.8.1</b> Quantifying Information Flow Between Social Media and the Stock Market</a></li>
<li class="chapter" data-level="5.8.2" data-path="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html"><a href="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html#detecting-causal-links-between-investor-sentiment-and-cryptocurrency-prices"><i class="fa fa-check"></i><b>5.8.2</b> Detecting Causal Links Between Investor Sentiment and Cryptocurrency Prices</a></li>
</ul></li>
<li class="chapter" data-level="5.9" data-path="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html"><a href="how-to-measure-statistical-causality-a-transfer-entropy-approach-with-financial-applications.html#conclusions"><i class="fa fa-check"></i><b>5.9</b> Conclusions</a></li>
</ul></li>
<li class="chapter" data-level="6" data-path="financial-networks.html"><a href="financial-networks.html"><i class="fa fa-check"></i><b>6</b> Financial Networks</a><ul>
<li class="chapter" data-level="6.1" data-path="financial-networks.html"><a href="financial-networks.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
<li class="chapter" data-level="6.2" data-path="financial-networks.html"><a href="financial-networks.html#network-construction"><i class="fa fa-check"></i><b>6.2</b> Network Construction</a><ul>
<li class="chapter" data-level="6.2.1" data-path="financial-networks.html"><a href="financial-networks.html#network-filtering-asset-graphs"><i class="fa fa-check"></i><b>6.2.1</b> Network Filtering: Asset Graphs</a></li>
<li class="chapter" data-level="6.2.2" data-path="financial-networks.html"><a href="financial-networks.html#network-filtering-mst"><i class="fa fa-check"></i><b>6.2.2</b> Network Filtering: MST</a></li>
<li class="chapter" data-level="6.2.3" data-path="financial-networks.html"><a href="financial-networks.html#network-filtering-pmfg"><i class="fa fa-check"></i><b>6.2.3</b> Network Filtering: PMFG</a></li>
</ul></li>
<li class="chapter" data-level="6.3" data-path="financial-networks.html"><a href="financial-networks.html#applications"><i class="fa fa-check"></i><b>6.3</b> Applications</a><ul>
<li class="chapter" data-level="6.3.1" data-path="financial-networks.html"><a href="financial-networks.html#industry-taxonomy"><i class="fa fa-check"></i><b>6.3.1</b> Industry Taxonomy</a></li>
<li class="chapter" data-level="6.3.2" data-path="financial-networks.html"><a href="financial-networks.html#portfolio-construction"><i class="fa fa-check"></i><b>6.3.2</b> Portfolio Construction</a></li>
</ul></li>
</ul></li>
<li class="part"><span><b>VI Alternative Data</b></span></li>
<li class="chapter" data-level="7" data-path="the-market-the-players-and-the-rules.html"><a href="the-market-the-players-and-the-rules.html"><i class="fa fa-check"></i><b>7</b> The Market, The Players and The Rules</a><ul>
<li class="chapter" data-level="7.1" data-path="the-market-the-players-and-the-rules.html"><a href="the-market-the-players-and-the-rules.html#the-market"><i class="fa fa-check"></i><b>7.1</b> The Market</a></li>
<li class="chapter" data-level="7.2" data-path="the-market-the-players-and-the-rules.html"><a href="the-market-the-players-and-the-rules.html#the-data"><i class="fa fa-check"></i><b>7.2</b> The Data</a></li>
<li class="chapter" data-level="7.3" data-path="the-market-the-players-and-the-rules.html"><a href="the-market-the-players-and-the-rules.html#the-buyers"><i class="fa fa-check"></i><b>7.3</b> The Buyers</a></li>
<li class="chapter" data-level="7.4" data-path="the-market-the-players-and-the-rules.html"><a href="the-market-the-players-and-the-rules.html#conclusion-1"><i class="fa fa-check"></i><b>7.4</b> Conclusion</a></li>
</ul></li>
<li class="appendix"><span><b>Appendix</b></span></li>
<li class="chapter" data-level="A" data-path="statistical-methods.html"><a href="statistical-methods.html"><i class="fa fa-check"></i><b>A</b> Statistical Methods</a><ul>
<li class="chapter" data-level="A.1" data-path="statistical-methods.html"><a href="statistical-methods.html#kde"><i class="fa fa-check"></i><b>A.1</b> Kernel Density Estimation</a></li>
</ul></li>
<li class="chapter" data-level="B" data-path="datasets.html"><a href="datasets.html"><i class="fa fa-check"></i><b>B</b> Datasets</a><ul>
<li class="chapter" data-level="B.1" data-path="datasets.html"><a href="datasets.html#dt-indices"><i class="fa fa-check"></i><b>B.1</b> Log-Returns of International Stock Market Indices Prices</a><ul>
<li class="chapter" data-level="B.1.1" data-path="datasets.html"><a href="datasets.html#dataset-location"><i class="fa fa-check"></i><b>B.1.1</b> Dataset Location</a></li>
<li class="chapter" data-level="B.1.2" data-path="datasets.html"><a href="datasets.html#dataset-description"><i class="fa fa-check"></i><b>B.1.2</b> Dataset Description</a></li>
<li class="chapter" data-level="B.1.3" data-path="datasets.html"><a href="datasets.html#data-source"><i class="fa fa-check"></i><b>B.1.3</b> Data Source</a></li>
<li class="chapter" data-level="B.1.4" data-path="datasets.html"><a href="datasets.html#code"><i class="fa fa-check"></i><b>B.1.4</b> Code</a></li>
<li class="chapter" data-level="B.1.5" data-path="datasets.html"><a href="datasets.html#dataset-scheme"><i class="fa fa-check"></i><b>B.1.5</b> Dataset Scheme</a></li>
</ul></li>
<li class="chapter" data-level="B.2" data-path="datasets.html"><a href="datasets.html#dt-FAANG"><i class="fa fa-check"></i><b>B.2</b> Log-Returns of FAANG Prices</a><ul>
<li class="chapter" data-level="B.2.1" data-path="datasets.html"><a href="datasets.html#dataset-location-1"><i class="fa fa-check"></i><b>B.2.1</b> Dataset Location</a></li>
<li class="chapter" data-level="B.2.2" data-path="datasets.html"><a href="datasets.html#dataset-description-1"><i class="fa fa-check"></i><b>B.2.2</b> Dataset Description</a></li>
<li class="chapter" data-level="B.2.3" data-path="datasets.html"><a href="datasets.html#data-source-1"><i class="fa fa-check"></i><b>B.2.3</b> Data Source</a></li>
<li class="chapter" data-level="B.2.4" data-path="datasets.html"><a href="datasets.html#code-1"><i class="fa fa-check"></i><b>B.2.4</b> Code</a></li>
<li class="chapter" data-level="B.2.5" data-path="datasets.html"><a href="datasets.html#dataset-scheme-1"><i class="fa fa-check"></i><b>B.2.5</b> Dataset Scheme</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="" data-path="references.html"><a href="references.html"><i class="fa fa-check"></i>References</a></li>
<li class="divider"></li>
<li><a href="https://creativecommons.org/licenses/by/4.0/" target="blank">CC-BY 4.0</a></li>
<li><a href="https://github.com/souzatharsis/open-quant-live-book" target="blank">See source code on Github</a></li>

</ul>

      </nav>
    </div>

    <div class="book-body">
      <div class="body-inner">
        <div class="book-header" role="navigation">
          <h1>
            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">The Open Quant Live Book</a>
          </h1>
        </div>

        <div class="page-wrapper" tabindex="-1" role="main">
          <div class="page-inner">

            <section class="normal" id="section-">
<div id="risk-parity-portfolios" class="section level1">
<h1><span class="header-section-number">Chapter 3</span> Risk Parity Portfolios</h1>
<div id="introduction-1" class="section level2">
<h2><span class="header-section-number">3.1</span> Introduction</h2>
<p>The “risk parity” approach was popularized by Ray Dalio’s Bridgewater Associates - the largest hedge fund by assets under management ($132.8 billions of USD) - with the creation of the All Weather asset allocation strategy in 1996. “All Weather” is a term used to designate funds that tend to perform reasonably well during both favorable and unfavorable economic and market conditions. Today, several managers have employed “All Weather” concepts under a risk parity approach.</p>
<div class="figure" style="text-align: center"><span id="fig:unnamed-chunk-39"></span>
<img src="chapters/RiskParity/ray.jpg" alt="7 November 2018; Ray Dalio, Bridgewater Associates on Centre Stage during day two of Web Summit 2018 at the Altice Arena in Lisbon, Portugal. Photo by David Fitzgerald/Web Summit via SportsfilePhoto by David Fitzgerald /Sportsfile." width="100%" />
<p class="caption">
Figure 3.1: 7 November 2018; Ray Dalio, Bridgewater Associates on Centre Stage during day two of Web Summit 2018 at the Altice Arena in Lisbon, Portugal. Photo by David Fitzgerald/Web Summit via SportsfilePhoto by David Fitzgerald /Sportsfile.
</p>
</div>
<p>A risk parity portfolio seeks to achieve an equal balance between the risk associated with each asset class or portfolio component. In that way, lower risk asset classes will generally have higher notional allocations than higher risk asset classes.</p>
<blockquote>
<p>Risk Parity is about <strong>Balance</strong> - <a href="https://www.bridgewater.com">Bridgewater</a>.</p>
</blockquote>
<p>Risk parity strategies suffered in recent history (2010-2017) as the bull market has pushed stocks to a record high hence favoring equity-concentrated portfolios. However, the increase in market volatility since 2018, the emergency of geo-political and tradewars risk as well as the growth in haven assets like Gold create conditions that strengthen the case for diversified portfolios. This is demonstrated in Fig. <a href="risk-parity-portfolios.html#fig:riskparityBLO">3.2</a> which shows that the S&amp;P risk parity strategy has returned almost 10% over the last 12 months (Aug/2018 - Aug-2019), more than double the S&amp;P 500 index of U.S. stocks.</p>
<div class="figure" style="text-align: center"><span id="fig:riskparityBLO"></span>
<img src="chapters/RiskParity/riskparity.png" alt="S&amp;P 500 index versus S&amp;P Risk Parity Index. Source: Bloomberg." width="100%" />
<p class="caption">
Figure 3.2: S&amp;P 500 index versus S&amp;P Risk Parity Index. Source: Bloomberg.
</p>
</div>
<p>In Aug/2019, there have been news about the launch of a new Risk Parity ETF in the US. The RPAR Risk Parity ETF plans to allocate across asset classes based on risk, regulatory filings show. The fund would be the first in the U.S. to follow this quantitative approach, allotting more money to securities with lower volatility according to <a href="https://www.bloomberg.com/news/articles/2019-08-19/ray-dalio-inspired-a-risk-parity-etf-by-bridgewater-bofa-alums">Bloomberg</a>.</p>
<blockquote>
<p>[The RPAR Risk Parity ETF is] kind of like Bridgewater does, but they just do it for the wealthiest institutions in the world. The idea here is to build something that would work for everybody. - Alex Shahidi, former relationship manager at Dalio’s Bridgewater Associate and creator of the RPAR Risk Parity ETF. <a href="https://www.bloomberg.com/news/articles/2019-08-19/ray-dalio-inspired-a-risk-parity-etf-by-bridgewater-bofa-alums">Bloomberg</a>.</p>
</blockquote>
<p>But how can we a risk parity portfolio? How does it perform against a traditional mean/variance model?</p>
<p>In this Chapter,</p>
<ol style="list-style-type: decimal">
<li>We will show how you can build your own Risk Parity portfolio</li>
<li>We will create and compare the performance two indices:</li>
</ol>
<ul>
<li>A FAANG Risk Parity Index of FAANG companies with equal risk balance</li>
<li>A FAANG Tangency Portfolio Index of FAANG companies with weights such that return/risk ratio is maximized</li>
</ul>
<p>By the end of the Chapter, you will be able to create your own risk parity / All Weather fund and compare it against your benchmark of choice.</p>
</div>
<div id="risk-parity-portfolio" class="section level2">
<h2><span class="header-section-number">3.2</span> Risk Parity Portfolio</h2>
A risk parity portfolio denotes a class of portfolios whose assets verify the following equalities <span class="citation">(Vinicius and Palomar <a href="#ref-R-riskParityPortfolio">2019</a>)</span>:
<span class="math display">\[\begin{equation}
w_{i} \frac{\partial f(\mathbf{w})}{\partial w_{i}}=w_{j} \frac{\partial f(\mathbf{w})}{\partial w_{j}}, \forall i, j
\end{equation}\]</span>
<p>where <span class="math inline">\(f\)</span> is a positively homogeneous function of degree one that measures the total risk of the portfolio and <span class="math inline">\(\mathbf{w}\)</span> is the portfolio weight vector. In other words, the marginal risk contributions for every asset in a risk parity portfolio are equal. A common choice for <span class="math inline">\(f\)</span>, for instance, is the standard deviation of the portfolio, which is usually called volatility, i.e., <span class="math inline">\(f(\mathbf{w})=\sqrt{\mathbf{w}^{T} \mathbf{\Sigma} \mathbf{w}}\)</span>, where <span class="math inline">\(\mathbf{\Sigma}\)</span> is the covariance matrix of assets.</p>
In practice, risk and portfolio managers have risk mandates they follow or bounds for marginal risk contributions at the asset, country, regional or sector levels. Hence, a natural extension of the risk parity portfolio is the so called risk budget portfolio, in which the marginal risk contributions match preassigned quantities <span class="citation">(Vinicius and Palomar <a href="#ref-R-riskParityPortfolio">2019</a>)</span>. Mathematically,
<span class="math display">\[\begin{equation}
w_{i}(\Sigma \mathbf{w})_{i}=b_{i} \mathbf{w}^{T} \Sigma \mathbf{w}, \forall i,
\end{equation}\]</span>
<p>where <span class="math inline">\(\mathbf{b} \triangleq\left(b_{1}, b_{2}, \ldots, b_{N}\right)\left(\text { with } \mathbf{1}^{T} \mathbf{b}=1 \text { and } \mathbf{b} \geq \mathbf{0}\right)\)</span> is the vector of desired marginal risk contributions.</p>
</div>
<div id="tangency-portfolio" class="section level2">
<h2><span class="header-section-number">3.3</span> Tangency Portfolio</h2>
<p>Mean variance optimization is a commonly used quantitative tool part of Modern Portfolio Theory that allows investors to perform allocation by considering the trade-off between risk and return.</p>
<div class="figure" style="text-align: center"><span id="fig:unnamed-chunk-40"></span>
<img src="chapters/RiskParity/harry.png" alt="In 1990, Dr. Harry M. Markowitz shared The Nobel Prize in Economics for his work on portfolio theory." width="100%" />
<p class="caption">
Figure 3.3: In 1990, Dr. Harry M. Markowitz shared The Nobel Prize in Economics for his work on portfolio theory.
</p>
</div>
In a mean-variance framework, the objective is to minimize portfolio risk <span class="math inline">\(\sigma^2\)</span> subject to a baseline expected rate of return <span class="math inline">\(\mu_b\)</span> as follows:
<span class="math display">\[\begin{equation}
\begin{array}{ll}{\mathcal{M}} &amp; {\text { minimize } \quad \frac{1}{2} w^{T} \Sigma w} \\ {\text { subject to }} &amp; {\mathrm{m}^{T} w \geq \mu_{b}, \text { and } \mathbf{1}^{T} w=1}\end{array}
\end{equation}\]</span>
<p>where <span class="math inline">\(m\)</span> is the vector of expected returns for the portfolio assets.</p>
We will obtain an optimal portfolio (min risk) for each target rate of return <span class="math inline">\(\mu_b\)</span> thus forming an efficient frontier. Each point in the efficient frontier in Fig. <a href="risk-parity-portfolios.html#fig:efficientport">3.4</a> is a portfolio with an optimal combination of securities that minimized risk given a level of risk (standard deviation). The dots below the efficient frontier are portfolios with inferior performance. They either offer the same returns but with higher risk, or they offer less return for the same risk.
<div class="figure" style="text-align: center"><span id="fig:efficientport"></span>
<img src="chapters/RiskParity/efficientport.jpg" alt="Efficienty Frontier. Attribution: ShuBraque (CC BY-SA 3.0)" width="100%" />
<p class="caption">
Figure 3.4: Efficienty Frontier. Attribution: ShuBraque (CC BY-SA 3.0)
</p>
</div>
<p>But how can we choose a portfolio from the efficient frontier? One approach is to choose the most efficient portfolio from a risk/return standpoint, i.e., the portfolio with the highest Sharpe ratio (ratio between excess return and portfolio standard deviation). This portfolio is called the tangency portfolio and it’s located at the tangency point of the Capital Allocation Line and the Efficient Frontier.</p>
<p>We will implement both a parity risk and a tangency portfolio in the next section.</p>
</div>
<div id="optimizing-faang-ray-dalio-versus-markowitz" class="section level2">
<h2><span class="header-section-number">3.4</span> Optimizing FAANG: Ray Dalio versus Markowitz</h2>
<div id="single-portfolio" class="section level3">
<h3><span class="header-section-number">3.4.1</span> Single Portfolio</h3>
<p>First, we will load log-returns of adjusted prices for FAANG companies, i.e., the stocks identified by the following tickers: FB, AMZN, AAPL, NFLX and GOOG (see Appendix <a href="datasets.html#dt-FAANG">B.2</a> for code used to generate this dataset).</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(xts)
<span class="co"># load FAANG returns</span>
faang.returns&lt;-<span class="kw">as.xts</span>(<span class="kw">read.zoo</span>(<span class="st">&#39;./data/FAANG.csv&#39;</span>,
                               <span class="dt">header=</span><span class="ot">TRUE</span>,
                               <span class="dt">index.column=</span><span class="dv">1</span>, <span class="dt">sep=</span><span class="st">&quot;,&quot;</span>))</code></pre></div>
<p>We can use the packages <strong>riskParityPortfolio</strong> and <strong>fPortfolio</strong> to build a FAANG risk parity and tangency portfolios, respectively. We will first consider FAANG returns from 2018 to build the portfolios as follows:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(IDPmisc)
<span class="kw">library</span>(riskParityPortfolio)
<span class="kw">library</span>(fPortfolio)

<span class="co"># consider returns from 2018</span>
<span class="co"># omit days with missing data (INF/NA returns)</span>
faang.returns.filtered &lt;-<span class="st"> </span><span class="kw">NaRV.omit</span>(<span class="kw">as.matrix</span>(faang.returns[<span class="st">&quot;2018&quot;</span>]))

<span class="co"># calculate covariance matrix</span>
Sigma &lt;-<span class="st"> </span><span class="kw">cov</span>(faang.returns.filtered)

<span class="co"># compute risk parity portfolio</span>
portfolio.parity &lt;-<span class="st"> </span><span class="kw">riskParityPortfolio</span>(Sigma)

<span class="co"># compute tangency portfolio</span>
portfolio.tangency &lt;-<span class="st"> </span><span class="kw">tangencyPortfolio</span>(<span class="kw">as.timeSeries</span>(faang.returns.filtered), 
                                        <span class="dt">constraints =</span> <span class="st">&quot;LongOnly&quot;</span>)
portfolio.weights &lt;-<span class="st"> </span><span class="kw">rbind</span>(portfolio.parity<span class="op">$</span>w, <span class="kw">getWeights</span>(portfolio.tangency))
<span class="kw">row.names</span>(portfolio.weights)&lt;-<span class="kw">c</span>(<span class="st">&quot;Parity Portfolio&quot;</span>, <span class="st">&quot;Tangency Portfolio&quot;</span>)</code></pre></div>
<p>Fig. <a href="risk-parity-portfolios.html#fig:parityweights">3.5</a> shows the portfolio weights obtained for both the Parity and the Tangency portfolios. We observe that the Tangency portfolio concentrates the weights between Amazon and Netflix with both companies having nearly the same weight while Facebook, Apple and Google are left out of the portfolio. On the other hand, the Parity portfolio presents a well-balanced distribution of weights among the FAANG companies with all company weights around 20%. Apple and Google have weights a little over 20% while Netflix is the company with the lowest weight (15%).</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">barplot</span>(portfolio.weights, <span class="dt">main =</span> <span class="st">&quot;&quot;</span>, <span class="dt">xlab =</span> <span class="st">&quot;stocks&quot;</span>, <span class="dt">ylab =</span> <span class="st">&quot;dollars&quot;</span>,
        <span class="dt">beside =</span> <span class="ot">TRUE</span>, <span class="dt">legend =</span> <span class="ot">TRUE</span>, <span class="dt">col=</span><span class="kw">c</span>(<span class="st">&quot;black&quot;</span>, <span class="st">&quot;red&quot;</span>),
        <span class="dt">args.legend =</span> <span class="kw">list</span>(<span class="dt">bg =</span> <span class="st">&quot;white&quot;</span>))</code></pre></div>
<div class="figure"><span id="fig:parityweights"></span>
<img src="open-quant-live-book_files/figure-html/parityweights-1.png" alt="Portfolio weights for parity and tangency FAANG portfolios considering returns from 2018." width="672" />
<p class="caption">
Figure 3.5: Portfolio weights for parity and tangency FAANG portfolios considering returns from 2018.
</p>
</div>
<p>Fig. <a href="risk-parity-portfolios.html#fig:parityrisks">3.6</a> compares the (covariance) risk budget of the Parity and Tangency portfolios obtained. As expected, we observe that the Parity portfolio has a risk budget equally distributed among the portfolio assets. On the other hand, the Tangency portfolio concentrates the risk between Amazon and Netflix with the latter corresponding to over 56% of the risk budget of the portfolio.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">portfolio.risks &lt;-<span class="st"> </span><span class="kw">rbind</span>(portfolio.parity<span class="op">$</span>risk_contribution<span class="op">/</span><span class="kw">sum</span>(portfolio.parity<span class="op">$</span>risk_contribution), <span class="kw">getCovRiskBudgets</span>(portfolio.tangency))
<span class="kw">row.names</span>(portfolio.risks)&lt;-<span class="kw">c</span>(<span class="st">&quot;Parity Portfolio&quot;</span>, <span class="st">&quot;Tangency Portfolio&quot;</span>)
<span class="kw">barplot</span>(portfolio.risks, <span class="dt">main =</span> <span class="st">&quot;&quot;</span>, <span class="dt">xlab =</span> <span class="st">&quot;stocks&quot;</span>, <span class="dt">ylab =</span> <span class="st">&quot;Covariance Risk Budget&quot;</span>,
        <span class="dt">beside =</span> <span class="ot">TRUE</span>, <span class="dt">legend =</span> <span class="ot">TRUE</span>, <span class="dt">col=</span><span class="kw">c</span>(<span class="st">&quot;black&quot;</span>, <span class="st">&quot;red&quot;</span>),
        <span class="dt">args.legend =</span> <span class="kw">list</span>(<span class="dt">bg =</span> <span class="st">&quot;white&quot;</span>))</code></pre></div>
<div class="figure"><span id="fig:parityrisks"></span>
<img src="open-quant-live-book_files/figure-html/parityrisks-1.png" alt="Portfolio covariance risk budget for parity and tangency FAANG portfolios considering returns from 2018." width="672" />
<p class="caption">
Figure 3.6: Portfolio covariance risk budget for parity and tangency FAANG portfolios considering returns from 2018.
</p>
</div>
</div>
<div id="the-ray-dalio-faang-index" class="section level3">
<h3><span class="header-section-number">3.4.2</span> The Ray Dalio FAANG Index</h3>
<p>What would be the performance of a “Ray Dalio FAANG Index” i.e. a portfolio composed of FAANG companies and rebalanced to match a corresponding Risk Parity portfolio? Would it beat a corresponding Tagency portfolio?</p>
<p>To answer these questions, we will consider a portfolio of FAANG companies in the time period from 2014-01-01 and 2019-09-01 and build two indices:</p>
<ol style="list-style-type: decimal">
<li>Risk Parity Index: Rebalances portfolio weights quarterly setting the weights according to a risk parity portfolio;</li>
<li>Tangency Portfolio Index: Rebalances portfolio weights quarterly setting weights according to a Tangency portfolio.</li>
</ol>
<p>We first define our rebalance dates by constructing a rolling window of 12-month width and a 3-month step-size as follows:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(fPortfolio)
faang.returns.xts&lt;-faang.returns[<span class="st">&quot;2014-01-01/2019-09-01&quot;</span>]
rWindows&lt;-<span class="kw">rollingWindows</span>(faang.returns.xts, <span class="dt">period=</span><span class="st">&quot;12m&quot;</span>,
                         <span class="dt">by=</span><span class="st">&quot;3m&quot;</span>)</code></pre></div>
<p>Our rebalance dates are the following:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">print</span>(rWindows<span class="op">$</span>to)</code></pre></div>
<pre><code>## GMT
##  [1] [2014-12-31] [2015-03-31] [2015-06-30] [2015-09-30] [2015-12-31]
##  [6] [2016-03-31] [2016-06-30] [2016-09-30] [2016-12-31] [2017-03-31]
## [11] [2017-06-30] [2017-09-30] [2017-12-31] [2018-03-31] [2018-06-30]
## [16] [2018-09-30] [2018-12-31] [2019-03-31] [2019-06-30]</code></pre>
<p>Next, we calculate risk parity portfolio weights at each rebalance date considering returns in a 12-month window as follows:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Apply FUN to time-series R in the subset [from, to].</span>
ApplyFilter &lt;-<span class="st"> </span><span class="cf">function</span>(from, to, R, FUN){
  <span class="kw">return</span>(<span class="kw">FUN</span>(R[<span class="kw">paste0</span>(from, <span class="st">&quot;/&quot;</span>, to)]))
}
<span class="co"># For each pair (from, to) ApplyFilter to time-series R using FUN</span>
ApplyRolling &lt;-<span class="st"> </span><span class="cf">function</span>(from, to, R, FUN){
  <span class="kw">library</span>(purrr)
  <span class="kw">return</span>(<span class="kw">map2</span>(from, to, ApplyFilter, <span class="dt">R=</span>R, <span class="dt">FUN=</span>FUN))
}
<span class="co"># Returns weights of a risk parity portfolio from covariance matrix of matrix of returns r</span>
CalculateRiskParity &lt;-<span class="st"> </span><span class="cf">function</span>(r){
  <span class="kw">library</span>(riskParityPortfolio)
  <span class="kw">return</span>(<span class="kw">riskParityPortfolio</span>(<span class="kw">cov</span>(r))<span class="op">$</span>w)
}
<span class="co"># Given a matrix of returns `r`,</span>
<span class="co"># calculates risk parity weights for each date in `to` considering a time window from `from` and `to` </span>
RollingRiskParity &lt;-<span class="st"> </span><span class="cf">function</span>(from, to, r){
  <span class="kw">library</span>(rlist)
  p&lt;-<span class="kw">ApplyRolling</span>(from, to, r, CalculateRiskParity)
  <span class="kw">names</span>(p)&lt;-to
  <span class="kw">return</span>(<span class="kw">list.rbind</span>(p))
}

parity.weights&lt;-<span class="kw">RollingRiskParity</span>(rWindows<span class="op">$</span>from<span class="op">@</span>Data, rWindows<span class="op">$</span>to<span class="op">@</span>Data, faang.returns.xts)</code></pre></div>
<p>We now calculate quarterly weights for FAANG tangency portfolios. We leverage the <strong>fPortfolio</strong> package to calculate a rolling tangency portfolio as follows:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(fPortfolio)
faang.returns.ts&lt;-<span class="kw">as.timeSeries</span>(faang.returns.xts)
Spec =<span class="st"> </span><span class="kw">portfolioSpec</span>()

rolling.portfolio.tangency &lt;-<span class="st"> </span><span class="kw">rollingTangencyPortfolio</span>(faang.returns.ts,
                                                       <span class="dt">constraints =</span> <span class="st">&quot;LongOnly&quot;</span>,
                                                       <span class="dt">from=</span>rWindows<span class="op">$</span>from,
                                                       <span class="dt">to=</span>rWindows<span class="op">$</span>to,
                                                       <span class="dt">spec=</span>Spec)

<span class="kw">names</span>(rolling.portfolio.tangency)&lt;-rWindows<span class="op">$</span>to
tan.weights &lt;-<span class="st"> </span><span class="kw">sapply</span>(rolling.portfolio.tangency,getWeights)
<span class="kw">rownames</span>(tan.weights) &lt;-<span class="st"> </span><span class="kw">colnames</span>(faang.returns.ts)
tan.weights&lt;-<span class="kw">t</span>(tan.weights)</code></pre></div>
<p>Figs. <a href="risk-parity-portfolios.html#fig:rollingparityweights">3.7</a> and <a href="risk-parity-portfolios.html#fig:rollingtangencyweights">3.8</a> show the portfolio weights obtained for parity risk and tangency portfolios, respectively. We observe that the risk parity weights are quite stable over time with Netflix having a slightly underweighting compared to the other portfolio constituents. On the other hand, the tangency portfolio weights vary considerably throughout the time period considered, which can impose challenges in its maintenance as its turnover can be quite high. The tangency portfolio overweights Apple and Amazon across many rebalance dates and it underweights Google in all rebalance dates.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">PerformanceAnalytics<span class="op">::</span><span class="kw">chart.StackedBar</span>(parity.weights, 
                 <span class="dt">xlab =</span> <span class="st">&quot;Rebalance Dates&quot;</span>,
                 <span class="dt">ylab =</span> <span class="st">&quot;Weight&quot;</span>, 
                 <span class="dt">main =</span> <span class="st">&quot;FAANG Risk Parity&quot;</span>)</code></pre></div>
<div class="figure" style="text-align: center"><span id="fig:rollingparityweights"></span>
<img src="open-quant-live-book_files/figure-html/rollingparityweights-1.png" alt="Portfolio weights for FAANG risk parity portfolios." width="672" />
<p class="caption">
Figure 3.7: Portfolio weights for FAANG risk parity portfolios.
</p>
</div>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">PerformanceAnalytics<span class="op">::</span><span class="kw">chart.StackedBar</span>(tan.weights, <span class="dt">xlab =</span> <span class="st">&quot;Rebalance Dates&quot;</span>,
                 <span class="dt">ylab =</span> <span class="st">&quot;Weight&quot;</span>, 
                 <span class="dt">main =</span> <span class="st">&quot;FAANG Tangency Portfolio&quot;</span>)</code></pre></div>
<div class="figure" style="text-align: center"><span id="fig:rollingtangencyweights"></span>
<img src="open-quant-live-book_files/figure-html/rollingtangencyweights-1.png" alt="Portfolio weights for FAANG tangency portfolios." width="672" />
<p class="caption">
Figure 3.8: Portfolio weights for FAANG tangency portfolios.
</p>
</div>
<p>We will use the time series of FAANG companies and the time series of risk parity and tangency portfolio weights to calculate the returns of the risk parity and tangency portfolio indexes as follows:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(PerformanceAnalytics)
tan.returns &lt;-<span class="st"> </span><span class="kw">Return.portfolio</span>(faang.returns.xts, <span class="dt">weights=</span>tan.weights,<span class="dt">verbose=</span><span class="ot">TRUE</span>)
parity.returns &lt;-<span class="st"> </span><span class="kw">Return.portfolio</span>(faang.returns.xts, <span class="dt">weights=</span>parity.weights,<span class="dt">verbose=</span><span class="ot">TRUE</span>)
p.returns&lt;-<span class="kw">merge</span>(tan.returns<span class="op">$</span>returns, parity.returns<span class="op">$</span>returns)
<span class="kw">names</span>(p.returns)&lt;-<span class="kw">c</span>(<span class="st">&quot;FAANG Tangency Index&quot;</span>, <span class="st">&quot;FAANG Parity Index&quot;</span>)</code></pre></div>
<p>Fig. <a href="risk-parity-portfolios.html#fig:perfsummary">3.9</a> shows the performance summary for the risk parity index versus the tangency portfolio index. Surprisingly, the FAANG risk parity index outperforms the FAANG tangency portfolio index by quite a bit with a cumulative return of 169.482% versus 109.652% from the tangency portfolio index. The FAANG risk parity index also has a relatively lower drawdown across most of the period analyzed.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">### Performance Summary (return / drawdown)
PerformanceAnalytics<span class="op">::</span><span class="kw">charts.PerformanceSummary</span>(p.returns, <span class="dt">colorset=</span>rich6equal,
                          <span class="dt">lwd=</span><span class="dv">2</span>, <span class="dt">cex.legend =</span> <span class="fl">1.0</span>, <span class="dt">event.labels =</span> <span class="ot">TRUE</span>, <span class="dt">main =</span> <span class="st">&quot;&quot;</span>)</code></pre></div>
<div class="figure"><span id="fig:perfsummary"></span>
<img src="open-quant-live-book_files/figure-html/perfsummary-1.png" alt="Performance summary for the risk parity index versus the tangency portfolio index" width="100%" />
<p class="caption">
Figure 3.9: Performance summary for the risk parity index versus the tangency portfolio index
</p>
</div>
<p>Tables <a href="risk-parity-portfolios.html#tab:calretparity">3.1</a> and <a href="risk-parity-portfolios.html#tab:calrettangency">3.2</a> show the calendar returns for the risk parity and tangency portfolio indexes, respectively. Interestingly, in years where the tangency portfolio index had positive cumulative return, the risk parity index yielded less returns than the tangency portfolio index. Conversely, in years where the tangency portfolio index had negative cumulative return, the risk parity index showed superior performance than the tangency portfolio index. In that way, the risk parity index showed “not as good” but also “not as bad” yearly returns compared to the tangency portfolios.</p>
<table>
<caption><span id="tab:calretparity">Table 3.1: </span>Calendar Returns (%): FAANG Parity Index</caption>
<thead>
<tr class="header">
<th></th>
<th align="right">2015</th>
<th align="right">2016</th>
<th align="right">2017</th>
<th align="right">2018</th>
<th align="right">2019</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Jan</td>
<td align="right">2.1</td>
<td align="right">0.6</td>
<td align="right">2.1</td>
<td align="right">-0.6</td>
<td align="right">-1.2</td>
</tr>
<tr class="even">
<td>Feb</td>
<td align="right">-1.1</td>
<td align="right">3.7</td>
<td align="right">1.4</td>
<td align="right">-1.6</td>
<td align="right">1.0</td>
</tr>
<tr class="odd">
<td>Mar</td>
<td align="right">-0.6</td>
<td align="right">1.3</td>
<td align="right">0.0</td>
<td align="right">2.3</td>
<td align="right">1.6</td>
</tr>
<tr class="even">
<td>Apr</td>
<td align="right">0.9</td>
<td align="right">1.7</td>
<td align="right">1.7</td>
<td align="right">1.4</td>
<td align="right">0.9</td>
</tr>
<tr class="odd">
<td>May</td>
<td align="right">0.4</td>
<td align="right">-0.6</td>
<td align="right">0.1</td>
<td align="right">1.8</td>
<td align="right">-2.2</td>
</tr>
<tr class="even">
<td>Jun</td>
<td align="right">0.6</td>
<td align="right">1.3</td>
<td align="right">-0.4</td>
<td align="right">-0.4</td>
<td align="right">1.3</td>
</tr>
<tr class="odd">
<td>Jul</td>
<td align="right">-0.4</td>
<td align="right">1.3</td>
<td align="right">0.5</td>
<td align="right">1.8</td>
<td align="right">-1.1</td>
</tr>
<tr class="even">
<td>Aug</td>
<td align="right">-4.2</td>
<td align="right">0.2</td>
<td align="right">-0.1</td>
<td align="right">-0.2</td>
<td align="right">-0.4</td>
</tr>
<tr class="odd">
<td>Sep</td>
<td align="right">0.9</td>
<td align="right">0.7</td>
<td align="right">0.8</td>
<td align="right">0.3</td>
<td align="right">NA</td>
</tr>
<tr class="even">
<td>Oct</td>
<td align="right">-0.7</td>
<td align="right">-1.0</td>
<td align="right">0.2</td>
<td align="right">1.7</td>
<td align="right">NA</td>
</tr>
<tr class="odd">
<td>Nov</td>
<td align="right">1.8</td>
<td align="right">-1.2</td>
<td align="right">-0.9</td>
<td align="right">0.3</td>
<td align="right">NA</td>
</tr>
<tr class="even">
<td>Dec</td>
<td align="right">-1.8</td>
<td align="right">-1.3</td>
<td align="right">-0.8</td>
<td align="right">0.8</td>
<td align="right">NA</td>
</tr>
<tr class="odd">
<td>FAANG Parity Index</td>
<td align="right">-2.1</td>
<td align="right">6.9</td>
<td align="right">4.6</td>
<td align="right">7.8</td>
<td align="right">0.0</td>
</tr>
</tbody>
</table>
<table>
<caption><span id="tab:calrettangency">Table 3.2: </span>Calendar Returns (%): FAANG Tangency Index</caption>
<thead>
<tr class="header">
<th></th>
<th align="right">2015</th>
<th align="right">2016</th>
<th align="right">2017</th>
<th align="right">2018</th>
<th align="right">2019</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Jan</td>
<td align="right">-1.7</td>
<td align="right">-1.0</td>
<td align="right">4.5</td>
<td align="right">0.6</td>
<td align="right">-2.6</td>
</tr>
<tr class="even">
<td>Feb</td>
<td align="right">-1.6</td>
<td align="right">4.8</td>
<td align="right">1.7</td>
<td align="right">-1.4</td>
<td align="right">0.8</td>
</tr>
<tr class="odd">
<td>Mar</td>
<td align="right">-0.3</td>
<td align="right">1.5</td>
<td align="right">0.0</td>
<td align="right">2.4</td>
<td align="right">2.4</td>
</tr>
<tr class="even">
<td>Apr</td>
<td align="right">2.8</td>
<td align="right">5.0</td>
<td align="right">2.3</td>
<td align="right">0.7</td>
<td align="right">0.5</td>
</tr>
<tr class="odd">
<td>May</td>
<td align="right">0.3</td>
<td align="right">-0.5</td>
<td align="right">0.2</td>
<td align="right">1.4</td>
<td align="right">-2.1</td>
</tr>
<tr class="even">
<td>Jun</td>
<td align="right">1.0</td>
<td align="right">2.1</td>
<td align="right">-0.4</td>
<td align="right">-0.5</td>
<td align="right">1.6</td>
</tr>
<tr class="odd">
<td>Jul</td>
<td align="right">-0.4</td>
<td align="right">1.1</td>
<td align="right">0.7</td>
<td align="right">0.6</td>
<td align="right">-1.2</td>
</tr>
<tr class="even">
<td>Aug</td>
<td align="right">-4.6</td>
<td align="right">0.2</td>
<td align="right">0.0</td>
<td align="right">-0.3</td>
<td align="right">-0.4</td>
</tr>
<tr class="odd">
<td>Sep</td>
<td align="right">0.4</td>
<td align="right">0.9</td>
<td align="right">0.6</td>
<td align="right">1.1</td>
<td align="right">NA</td>
</tr>
<tr class="even">
<td>Oct</td>
<td align="right">0.5</td>
<td align="right">-0.7</td>
<td align="right">-0.4</td>
<td align="right">3.6</td>
<td align="right">NA</td>
</tr>
<tr class="odd">
<td>Nov</td>
<td align="right">2.0</td>
<td align="right">-1.3</td>
<td align="right">-0.5</td>
<td align="right">0.5</td>
<td align="right">NA</td>
</tr>
<tr class="even">
<td>Dec</td>
<td align="right">-1.9</td>
<td align="right">-1.8</td>
<td align="right">-0.9</td>
<td align="right">1.7</td>
<td align="right">NA</td>
</tr>
<tr class="odd">
<td>FAANG Tangency Index</td>
<td align="right">-3.7</td>
<td align="right">10.3</td>
<td align="right">7.9</td>
<td align="right">11.0</td>
<td align="right">-1.2</td>
</tr>
</tbody>
</table>
<p>Fig. <a href="risk-parity-portfolios.html#fig:rollingperfsummary">3.10</a> shows the performance summary in a rolling 252-day window. Again, we observe that the risk parity index presents a superior performance compared to the tangency portfolio index. The risk parity index presents higher annualized return, lower standard deviation and superior Sharpe ratio in most of the period analyzed compared to the tangency portfolio index. As presented in Tab. <a href="risk-parity-portfolios.html#tab:annualret">3.3</a>, the risk parity index has a total of 23.71% annualized return, 22.55% standard deviation and 1.051 Sharpe-ratio versus 17.22% annualized return, 26.42% standard deviation and 0.652 Sharpe-ratio from the tangency portfolio index.</p>
<div class="figure"><span id="fig:rollingperfsummary"></span>
<img src="open-quant-live-book_files/figure-html/rollingperfsummary-1.png" alt="Performance summary in a rolling 252-day window for the risk parity index versus the tangency portfolio index" width="100%" />
<p class="caption">
Figure 3.10: Performance summary in a rolling 252-day window for the risk parity index versus the tangency portfolio index
</p>
</div>
<table>
<caption><span id="tab:annualret">Table 3.3: </span>Annualized Returns</caption>
<thead>
<tr class="header">
<th></th>
<th align="right">FAANG Tangency Index</th>
<th align="right">FAANG Parity Index</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Annualized Return</td>
<td align="right">0.172</td>
<td align="right">0.237</td>
</tr>
<tr class="even">
<td>Annualized Std Dev</td>
<td align="right">0.264</td>
<td align="right">0.226</td>
</tr>
<tr class="odd">
<td>Annualized Sharpe (Rf=0%)</td>
<td align="right">0.652</td>
<td align="right">1.051</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="discussion-and-conclusion" class="section level2">
<h2><span class="header-section-number">3.5</span> Discussion and Conclusion</h2>
<p><em>What mix of assets has the best chance of delivering good returns over time through all economic environments?</em></p>
<p>That was the question posed by Bridgewater Associates before creating the All Weather funds with concepts today popularized in the so-called risk parity strategies.</p>
<p>The traditional approach to asset allocation often tolerates higher concentration of risk with the objective to generate higher longer-term returns. Bridgewater argues that this approach has a serious flaw:</p>
<blockquote>
<p>If the source of short-term risk is a heavy concentration in a single type of asset, this approach brings with it a significant risk of poor long-term returns that threatens the ability to meet future obligations. This is because every asset is susceptible to poor performance that can last for a decade or more, caused by a sustained shift in the economic environment - Bridgewater.</p>
</blockquote>
<p>In this Chapter, we introduced the concept of risk parity portfolios and compare it against a mean-variance model. We provided a simple practical example by constructing a FAANG risk parity index and comparing its performance against a FAANG tangency index, which selects the portfolio from the mean-variance efficient frontier with optimal Sharpe-ratio.</p>
<p>The risk parity index presented higher annualized return, lower standard deviation and superior Sharpe ratio in most of the period analyzed compared to the tangency portfolio index. Of course, results should be taken with caution.</p>
<p>In practice, both the risk parity and mean-variance approaches are employed in larger portfolios potentially across multiple asset classes. Those methodologies strive when there are assets that are uncorrelated in the portfolio which can increase the potential for diversification. Further, modern portfolio optimization strategies can be much more complex with a variety of objective functions and constraints. Our objective in this article was to give you a head start. Feel free to check out the source code in our github project and implement your own strategies!</p>

</div>
</div>



</div>



</div>
<h3>References</h3>
<div id="refs" class="references">
<div id="ref-R-riskParityPortfolio">
<p>Vinicius, Ze, and Daniel P. Palomar. 2019. <em>RiskParityPortfolio: Design of Risk Parity Portfolios</em>. <a href="https://CRAN.R-project.org/package=riskParityPortfolio" class="uri">https://CRAN.R-project.org/package=riskParityPortfolio</a>.</p>
</div>
</div>
            </section>

          </div>
        </div>
      </div>
<a href="stylized-facts.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
<a href="entropy.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
    </div>
  </div>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/lunr.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script>
gitbook.require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"github": false,
"facebook": true,
"twitter": true,
"google": false,
"linkedin": true,
"weibo": false,
"instapaper": false,
"vk": false,
"all": ["facebook", "google", "twitter", "linkedin", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": "https://github.com/souzatharsis/open-quant-live-book/edit/master/chapters/RiskParity/RiskParity.Rmd",
"text": "Edit"
},
"history": {
"link": null,
"text": null
},
"download": ["open-quant-live-book.epub"],
"toc": {
"collapse": "subsection",
"scroll_highlight": true
}
});
});
</script>

<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    var src = "";
    if (src === "" || src === "true") src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML";
    if (location.protocol !== "file:")
      if (/^https?:/.test(src))
        src = src.replace(/^https?:/, '');
    script.src = src;
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>
</body>

</html>
